package net.csdra.DongPoShuZiTuShuGuan.service;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import net.csdra.DongPoShuZiTuShuGuan.domain.Video;
import org.springframework.data.domain.Page;

/**
 * Created by add on 2018/1/16.
 */
public interface VideoManagerService {

    Video getVideo(GetVideo getVideo);

    Video createVideo(CreateVideo createVideo);

    void deleteVideo(String id);

    Video updateVideo(UpdateVideo updateVideo);

    Page<Video> getAllVideo(GetAllVideo getAllVideo);

    Page<Video> getAllVideoByEnable(GetAllVideoByEnable getAllVideoByEnable);

    class GetVideo {
        String id;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }
    }

    @JsonIgnoreProperties(ignoreUnknown = true)
    class UpdateVideo{
        String id;
        //    视频名称
        String name;
        //    详情
        String info;
        //    视频链接
        String videoUrl;
        //    时间信息或各种辅助字段
        String customize;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getInfo() {
            return info;
        }

        public void setInfo(String info) {
            this.info = info;
        }

        public String getVideoUrl() {
            return videoUrl;
        }

        public void setVideoUrl(String videoUrl) {
            this.videoUrl = videoUrl;
        }

        public String getCustomize() {
            return customize;
        }

        public void setCustomize(String customize) {
            this.customize = customize;
        }
    }

    class GetVideoByMateId {

    }

    class GetAllVideo extends PageEntity{

    }

    class GetAllVideoByEnable extends PageEntity{
        boolean enable;

        public boolean isEnable() {
            return enable;
        }

        public void setEnable(boolean enable) {
            this.enable = enable;
        }
    }

    class CreateVideo {
        //    视频名称
        String name;
        //    详情
        String info;
        //    视频链接
        String videoUrl;
        //    时间信息或各种辅助字段
        String customize;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getInfo() {
            return info;
        }

        public void setInfo(String info) {
            this.info = info;
        }

        public String getVideoUrl() {
            return videoUrl;
        }

        public void setVideoUrl(String videoUrl) {
            this.videoUrl = videoUrl;
        }

        public String getCustomize() {
            return customize;
        }

        public void setCustomize(String customize) {
            this.customize = customize;
        }
    }
}
